﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace SanctusSoftware.Music.ChordSheetEditor.Client
{
    public class Settings
    {

        #region Constructor

        public Settings()
        {
            this.Target = ActionTarget.NewDocument;
            this.MinimumChordLineMatchPercentage = 51;
            this.LicenseKey = string.Empty;
        }

        #endregion

        #region Public Properties

        public ActionTarget Target { get; set; }

        public int MinimumChordLineMatchPercentage { get; set; }

        public string LicenseKey { get; set; }

        #endregion

        #region Singleton

        private static Settings instance = null;

        public static Settings GetInstance()
        {
            if (instance == null)
            {
                instance = SettingsProcessor.GetSettings();
            }

            return instance;
        }

        public static void SaveInstance()
        {
            SettingsProcessor.SaveSettings(instance);
        }

        #endregion

    }
}
